<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<form class="dggui-form" action="" id="remarkFrom" style="width: 93%;">
    <div class="dggui-form-item">
        <%--<div class="dggui-input-block">
            <textarea name="remarkInfo" placeholder="请输入备注内容" class="dggui-textarea"></textarea>
        </div>--%>
        <textarea name="remarkInfo" id="remarkInfo" placeholder="请输入备注内容,1-500字"  maxlength="500" class="dggui-textarea" style="margin-left: 20px;"></textarea>
    </div>
</form>
<script>
    function sureBlackOrder(id,obj,index){
        var return_remark = $("#remarkInfo").val().trim();
        if(return_remark.length>500){
            dggui.dialog.errors('备注信息不能超过500个字！');
            return;
        }
        if(return_remark.length<1){
            dggui.dialog.errors('备注信息不能少于1个字！');
            return;
        }
        dggui.dialog.loading();
        $.ajax({
            type: 'POST',
            async: true,
            data: {
                id:id,
                remark:return_remark
            },
            url: sysInfo.basePath+"/rzsc/processing_order/backorder_save.do",
            dataType: 'JSON',
            success: function (data) {
                dggui.dialog.loading('close');
                if (data.code == 0) {
                    layer.close(index);
                    dggui.dialog.succeed('操作成功！');
                    //刷新列表
                    if(isEmpty(obj)){
                        window.location.reload();
                    }else{
                        reloadTable(obj,"reloadFalse");
                    }
                } else {
                    dggui.dialog.errors(data.msg);
                }
            },
            error: function () {
                dggui.dialog.loading('close');
                dggui.dialog.errors('保存失败，请联系管理员！！');
            }
        })
    }
</script>